function Parent() {
    this.name = 'parent'
    this.like=['a','b','c']
}
function Child() {
    this.age=18

}
// 原型链继承
Child.prototype = new Parent()
Child.prototype.constructor=Child//修复指向

const c=new Child()
const d=new Child()
c.like.push('d')

console.log(c);
console.log(d.like);

